<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<title>新增收货地址</title>
	</head>
	<link rel="stylesheet" href="../../css/index.css" />
	<script type="text/javascript" src="../../libs/js/vue.min.js"></script>
	<script type="text/javascript" src="../../libs/js/vant.min.js"></script>
	<script type="text/javascript" src="../../libs/js/ajax.js"></script>
	<script type="text/javascript" src="../../libs/js/return.js"></script>
	<style>
		#biaoti {
			background-color: red;
		}
		
		.van-nav-bar {
			color: white;
		}
	</style>

	<body>
		<div id="app">
			<van-nav-bar id="biaoti" title="新增收货地址" left-text="返回" left-arrow @click-left="onClickLeft"></van-nav-bar>
			<van-address-edit show-postal show-delete show-set-default show-search-result @save="onSave" @delete="onDelete" @change-detail="onChangeDetail" />
		</div>
		<script>
			var vm = new Vue({
				el: "#app",
				data: {

				},
				methods: {
					onClickLeft() {
						plus.webview.close("Newaddress.html");
					},
					onSave() {
						Toast('save');
					},
					onDelete() {
						Toast('delete');
					},
					onChangeDetail(val) {
						if(val) {
							this.searchResult = [{
								name: '黄龙万科中心',
								address: '杭州市西湖区'
							}];
						} else {
							this.searchResult = [];
						}
					}
				}
			})
		</script>
	</body>

</html>